import {
    GETNUM,
    GETSELECT,
    GETSELECTALL,
    GETPULATE,
    NUM_CHANGE,
    SELECT_CHANGE,
    SELECT_ALL,
    PULATE,
} from './contant'

export default {
    // 数量更改执行的同步操作
    [GETNUM](action, keyword) {
        action.commit(NUM_CHANGE, keyword)
    },
    // 单个商品选中执行的同步操作
    [GETSELECT](action, name) {
        action.commit(SELECT_CHANGE, name)
    },
    // 全选执行的同步操作
    [GETSELECTALL](action, checked) {
        action.commit(SELECT_ALL, checked)
    },
    // 商品操作执行的同步操作
    [GETPULATE](action) {
        action.commit(PULATE)
    }
}